
         <table border="1px">
            <tr>
                <th>图片</th>
                <th>班级</th>
                <th>用户名</th>
                <th>密码</th>
                <th>性别</th>
                <th>年龄</th>
                <th>操作</th>
            </tr>
        
        

        
        
        
        <?php
        // put your code here
         $hostname="127.0.0.1";
        $username="root";
        $password="123456";
        $database="mysql123";

        $connet=mysqli_connect($hostname, $username, $password, $database);
        mysqli_set_charset($connet, "utf-8");
      
        if($connet){
            echo "链接成功";
            
//          $sqlstring="insert into user_inf(uname,sex,age) "
//                  ." values('李四','女','18')";
              $sqlstring="select * from user_inf";
            $result= mysqli_query($connet, $sqlstring);
            $row= mysqli_fetch_array($result);
           
            
             while ($row){
                 if($row){
            ?>
                <tr>
                    <td> <?php echo $row["ipx"];?></td> 
                    <td> <?php echo $row["class"];?></td> 
                    <td> <?php echo $row["uname"];?></td> 
                    <td> <?php echo $row["upasswd"];?></td> 
                    <td> <?php echo $row["sex"];?></td> 
                    <td> <?php echo $row["age"];?></td> 
                    <td><a href="./myadd.php">添加</a>
                        <a href="./myupdate.php">修改</a>
                    </td>
                    </br>
                </tr>
                    <?php
                     
                    }
                 $row= mysqli_fetch_array($result);
                 }
                     
             

            
            
        }else{
            echo '链接失败';
        }
        
        
        
 
        
          mysqli_close($connet);
        ?>
    </body>
</html>